import http from "@/api/axios";

export const getQueryPageApi = (data: ApprovalManagement.SearchForm) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPieceType/queryPage`,
    data
  });
};

export const editApi = (params: { id: string }) => {
  return http({
    method: "get",
    url: `base/biz/bizProblemPieceType/queryById`,
    params
  });
};

// 查询部门及部门用户
export const getDeptAndUserApi = () => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPieceType/getDeptAndUser`
  });
};

// 新增问题件类型
export const addDeptAndUserApi = (data: ApprovalManagement.editForm) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPieceType/add`,
    data
  });
};

// 编辑问题件类型
export const editDeptAndUserApi = (data: ApprovalManagement.editForm) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPieceType/edit`,
    data
  });
};

// 启-禁用
export const updateStateApi = (id: string) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPieceType/updateState/${id}`
  });
};
